using System;
using System.ComponentModel;

namespace SvgToFontConverter.Models
{
    /// <summary>
    /// 引擎类型枚举
    /// </summary>
    public enum EngineType
    {
        [Description("FontForge")]
        FontForge = 0,
        
        [Description("Fontello CLI")]
        FontelloCli = 1,
        
        [Description("SVG2TTF")]
        Svg2Ttf = 2
    }
    
    /// <summary>
    /// 引擎配置类
    /// </summary>
    public class EngineConfig
    {
        /// <summary>
        /// 当前选择的引擎类型
        /// </summary>
        public EngineType SelectedEngine { get; set; } = EngineType.FontForge;
        
        /// <summary>
        /// FontForge配置
        /// </summary>
        public FontForgeConfig FontForge { get; set; } = new FontForgeConfig();
        
        /// <summary>
        /// Fontello CLI配置
        /// </summary>
        public FontelloCliConfig FontelloCli { get; set; } = new FontelloCliConfig();
        
        /// <summary>
        /// SVG2TTF配置
        /// </summary>
        public Svg2TtfConfig Svg2Ttf { get; set; } = new Svg2TtfConfig();
    }
    
    /// <summary>
    /// FontForge引擎配置
    /// </summary>
    public class FontForgeConfig
    {
        /// <summary>
        /// FontForge安装路径（bin目录）
        /// </summary>
        public string InstallPath { get; set; } = string.Empty;
        
        /// <summary>
        /// 是否已验证路径有效性
        /// </summary>
        public bool IsValidated { get; set; } = false;
    }
    
    /// <summary>
    /// Fontello CLI引擎配置
    /// </summary>
    public class FontelloCliConfig
    {
        /// <summary>
        /// Node.js安装路径
        /// </summary>
        public string NodeJsPath { get; set; } = string.Empty;
        
        /// <summary>
        /// Fontello CLI项目路径
        /// </summary>
        public string FontelloCliPath { get; set; } = string.Empty;
        
        /// <summary>
        /// Fontello服务器地址
        /// </summary>
        public string ServerUrl { get; set; } = "https://fontello.com";
        
        /// <summary>
        /// 是否已验证配置有效性
        /// </summary>
        public bool IsValidated { get; set; } = false;
    }
    
    /// <summary>
    /// SVG2TTF引擎配置
    /// </summary>
    public class Svg2TtfConfig
    {
        /// <summary>
        /// Node.js安装路径
        /// </summary>
        public string NodeJsPath { get; set; } = string.Empty;
        
        /// <summary>
        /// SVG2TTF CLI工具路径（通常为全局安装）
        /// </summary>
        public string Svg2TtfPath { get; set; } = string.Empty;
        
        /// <summary>
        /// 是否已验证配置有效性
        /// </summary>
        public bool IsValidated { get; set; } = false;
    }
}